import request from '@/utils/request'

import type { Params } from '@/types/Api'

/**
 * 获取仓库列表
 * @returns Promise
 */
async function getLskCiaoRepos(params?: Params) {
  return request({
    url: '/v5/users/lsk_ciao/repos',
    params
  })
}

/**
 * 获取仓库下的版本
 * @param {string} repo 模板名称
 * @returns Promise
 */
async function getTagsByRepo(repo: string) {
  return request({
    url: `v5/repos/lsk_ciao/${repo}/tags`
  })
}

export { getLskCiaoRepos, getTagsByRepo }
